package com.qfmy.app.controller.community;

import com.qfmy.app.service.community.PostLikeService;
import com.qfmy.common.result.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 清风明月
 * @Package com.qfmy.app.controller.community
 * @date 2025/4/17
 * @description 帖子点赞
 */
@RestController
@RequestMapping("/app/postLike")
@SuppressWarnings("all")
public class PostLikeController {
    /**
     * 注入service
     */
    @Resource
    private PostLikeService postLikeService;

    /**
     * 对帖子进行点赞
     */
    @RequestMapping("/addPostLike")
    public Result addPostLike(@RequestParam Integer postId){
        postLikeService.addPostLike(postId);
        return Result.ok();
    }
}
